package initialize

import (
	"user_api/global"

	"github.com/micro/go-micro/v2"

	"go.uber.org/zap"

	proto "user_api/proto"
)

func InitSrvConn() {
	consulReg := global.ConsulClient

	Services := micro.NewService(
		micro.Name("user.client.api"),
		micro.Registry(consulReg),
	)

	userService := proto.NewUserSrvService("user.srv", Services.Client())
	zap.S().Debug("测试链接", userService)

	global.UserSrvClient = userService
}
